<div ng-controller="AttachCtrl" ng-init="listAction()">
    <ul class="sui-breadcrumb">
        <li>附件</li>
        <li class="active"> {{'列表' | translate}}
            <attachment owner-id="1" owner-type="movie" max-size="70MB" dhf-ng-model="uploader" xtype="url" mult="false" title="上传视频" use-type="mp4"></attachment>
            <attachment owner-id="1" owner-type="item" dhf-ng-model="img" xtype="url" mult="false" title="上传图片" use-type="png,jpeg,gif,jpg,JPG,PNG,JPEG,GIF" setback="setback(attach)"></attachment>
            分类：<cate-list ng-model="categoryId"></cate-list>
            <button class="btn-primary sui-btn" ng-click="listAction()">搜索</button>
        </li>
    </ul>
    <table class="sui-table table-bordered">
        <thead>
            <tr>
                <th>{{'图片名称'|translate}}</th>
                <th>{{'image'|translate}}</th>
                <th>{{'时间'|translate}}</th>
                <th>{{'大小'|translate}}</th>
                <th>{{'operation'|translate}}</th>
            </tr>
        </thead>
        <tbody>
            <tr ng-repeat="list in attachs">
                <td width="60">{{list.original_name}}</td>
                <td>
                    <a href="{{list.path}}" target="_blank">
                        <img ng-if="list.mime.indexOf('mp4')!='video/mp4'" ng-src="{{list.path}}" width="60">
                        <img ng-if="list.mime=='video/mp4'" src="//img.alicdn.com/imgextra/i1/20841398/TB2BCCdcrL9F1JjSZFwXXcSuVXa-20841398.jpeg" width="60">
                    </a>
                </td>
                <td>{{list.updated_at | ddtt}}</td>
                <td>{{list.size}}</td>
                <td>
                    <button class="sui-btn btn-danger" ng-click="delete(list.uuid,list.path)"> 删除 </button>
                </td>
            </tr>
        </tbody>
    </table>
    <pager page-no="1" page-size="pageSize" total="itemsTotal" get-data="getlist(pageNo)"></pager>
</div>